/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Rada.Html;

import Rada.RObject;
/**
 *
 * @author Miguel
 */
public class Ahref extends RObject{
    public String href;
    public String target;
    public String value;
    public Ahref(String v){
        super();
        value = v;
    }
    public Ahref(String v, String onclick){
        super();
        value = v;
        href = "#";
        addEvent("onclick", onclick);
    }
    public Ahref(){
        super();
        value="";
    }
    @Override
    public String show(){
        html="";
        html+="<a href='"+href+"' ";
        html+=getProperties();
        html+=getEvents();
        if (!(target==null || target.isEmpty())){
            html+=" target='"+target+"' ";
        }
        html+=">";
        html+=value;
        html+="</a>";
        return html;
    }
}
